package com;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

public class JDBC_04_Test_01 {

	public static void main(String[] args) throws Exception {
		Connection connection = DBUtil.getConnection();
		Statement statement = connection.createStatement();
		String sql = "select * from student";
		ResultSet resultSet = statement.executeQuery(sql);

		while (resultSet.next()) {
			System.out.println(resultSet.getString("sname"));
		}
	}

}
